package Scanner;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class Scanner {
	public double[] read(File sample) throws IOException
	{
		FileInputStream fis;
		int len = (int)sample.length();
		
		byte[] info = new byte[len];
		short infoTemp;
		double[] infoFinal = new double[(len-44)/2];
		
		fis = new FileInputStream(sample);
		fis.read(info);
		
		for(int i=44;i<len-1;i=i+2)
		{
			infoTemp = (short) ((info[i+1]<<8) | (info[i]&0xff));
			infoFinal[(i-44)/2] = (double)infoTemp;
		}
		
		return infoFinal;
	}
}
